<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<script>
    let obj = { apple : 10, orange : 20, banana : 30 };
    // 把对象变成一个个数组

    let entries = Object.entries(obj)
    console.log('entries',entries)

    let obj2 = [['a',2],['b',2],['c',2]]
    let fromEntries = Object.fromEntries(entries)
    console.log('obj2',formEntries);
    
</script>
</body>
</html>